<?php

namespace app\agent\controller\order;

use app\agent\controller\Controller;
use app\agent\model\order\Takeout as TakeoutModel;

/**
 * 外卖
 */
class Takeout extends Controller
{
    /**
     * 列表
     */
    public function list()
    {
        $model = new TakeoutModel;
        $data = input('post.');
        $data['agent'] = $this->agent;
        return $model->getList($data);
    }

    /**
     * 获取美团/饿了么最新订单状态
     */
    public function updateOrder()
    {
        $model = new TakeoutModel;
        $data = input('post.');
        return $model->updateOrder($data);
    }
}
